<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <ul>
        <li>111</li>
        <li>222</li>
        <li>333</li>
        <li>444</li>
        <li>555</li>
    </ul>
    <button>删除按钮</button>
    <script>
        var ul_items = document.querySelector('ul');
        var btn = document.querySelector('button');
        btn.onclick = function() {
            if (ul_items.children.length == 0) {
                return;
            }
            //每次点击按钮，删除第一个元素节点
            var item = ul_items.removeChild(ul_items.children[0]);
            //打印删除的结点
            console.log(item);
        }
    </script>
</body>
</html>